<?=view('header.html')?>
<section class="section">
    <div class="install" id="log">
        <ul id="loginner">
        </ul>
    </div>
    <div class="bottom tac">
        <a href="javascript:;" class="btn_old"><i class="layui-icon layui-icon-loading"></i>&nbsp;正在安装...</a>
    </div>
</section>
<script type="text/javascript">
var log = "<?=$log;?>";
var n = 0;
var timer = 0;
log = log.split('<ciams>');

function GoPlay() {
    if (n > log.length - 1) {
        n = -1;
        clearIntervals();
    }
    if (n > -1) {
        postcheck(n);
        n++;
    }
}

function postcheck(n) {
    document.getElementById('loginner').innerHTML += '<li><span class="correct_span">&radic;</span>创建数据表' + log[n] + '，完成</li>';
    document.getElementById('log').scrollTop = document.getElementById('log').scrollHeight;
}

function setIntervals() {
    timer = setInterval('GoPlay()', 50);
}

function clearIntervals() {
    clearInterval(timer);
    window.location.href = "<?=url('install/index', array('step'=>$step+1))?>";
}
setTimeout(setIntervals, 100);
</script>
<?=view('footer.html')?>